home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // This script is paired with "defaultToolProperties.mel"
- // to display a property sheet for those tools that
- // have not defined property sheet of their own
-
- global proc defaultToolValues ( string $toolName ) {
-
- string $parent = (`toolPropertyWindow -q -location` + "|defaultTool");
- setParent $parent;
-
- // If we can't find the icon then use the null string to
- // blank the picture altogether.
- //
- string $xpmName = "";
-
- // Get the current tool
- //
- string $currentTool = `currentCtx`;
-
- if (`superCtx -exists $currentTool`) {
- //
- // If it is part of a tool group then it's harder to get the icon
- // Figure out the icon of by querying the toolbox.
- //
- if ( `toolCollection -exists toolCluster` ){
- string $currentButton = `toolCollection -query -select toolCluster`;
- if ( `toolButton -exists $currentButton` ){
- $xpmName = `toolButton -query -image1 $currentButton`;
- }
- }
- } else {
- //
- // If it's a simple tool then just ask it what its icon is.
- //
- $xpmName =`contextInfo -q -i1 $currentTool`;
- }
-
- string $helpTag = "";
- toolPropertySetCommon $toolName $xpmName $helpTag;
-
- toolPropertySelect "defaultTool";
- }
-
-